package com.hiep.connect.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.hiep.connect.shared.MyUser;

public class UserRegisterEvent extends GwtEvent<UserRegisterEventHandler> {
	public static Type<UserRegisterEventHandler> TYPE = new Type<UserRegisterEventHandler>();
	private final MyUser user;

	public MyUser getUser() {
		return user;
	}

	public UserRegisterEvent(MyUser user) {
		this.user = user;
	}

	@Override
	public Type<UserRegisterEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(UserRegisterEventHandler handler) {
		handler.onUserRegister(this);
	}
}
